﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace DiaryPlanner.Diary
{
    public partial class pic_draw_add : Form
    {
        
        public mod_diary mod_diary_object;
        public new_diary new_diary_object;
        
        public int mod_or_new;//수정 or 새글

        draw_panel object_draw;
        photo_panel object_photo;

        public pic_draw_add(Diary.mod_diary object_mod)
        {
            InitializeComponent();
            mod_diary_object = object_mod;
            mod_or_new = 1;
            object_draw = new Diary.draw_panel(this);
            object_photo = new Diary.photo_panel(this);
            this.panel1.Controls.Clear();
            this.panel1.Controls.Add(object_draw);
        }
        
        public pic_draw_add(Diary.new_diary object_new)
        {
            InitializeComponent();
            new_diary_object = object_new;
            mod_or_new = 0;
            object_draw = new Diary.draw_panel(this);
            object_photo = new Diary.photo_panel(this);

            this.panel1.Controls.Clear();
            this.panel1.Controls.Add(object_draw);
        }

        private void draw_rbtn_CheckedChanged(object sender, EventArgs e)
        {
            this.panel1.Controls.Clear();
            this.panel1.Controls.Add(object_draw);
        }

        private void photo_rbtn_CheckedChanged(object sender, EventArgs e)
        {
            this.panel1.Controls.Clear();
            this.panel1.Controls.Add(object_photo);
        }
        /// <summary>
        /// 현재 window창의 Y좌표의 정보를 return
        /// </summary>
        /// <returns></returns>
        public int location_return()
        {
            return panel1.Location.Y;
        }

        private void panel1_Paint(object sender, PaintEventArgs e)
        {

        }
        
    }
}
